home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 7
/
Amiga Format AFCD07 (Dec 1996, Issue 91).iso
/
serious
/
shareware
/
programming
/
muirexx2.1
/
demos
/
muirexxbuild
/
ask_comm.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-08-24
|
3KB
|
102 lines
/* */
options results
parse arg comm' 'name
MUIA_Frame = 0x8042ac64 /* V4 i.. LONG */
Disabled = 0x80423661 /* V4 isg BOOL */
Image_FontMatch = 0x8042815d /* V4 i.. BOOL */
TRUE = 1
FALSE = 0
address BUILD
cycle ID L2
type = result
select
when comm = 'SET' then do
if name = '' then do
popasl ID S7
name = result
end
if index(name,'.info') > 0 then do
name = substr(name,1,index(name,'.info')-1)
type = 'Icon'
check ID C1 ATTRS Disabled TRUE
cycle ID L2 LABEL 'Icon'
end
check ID C1
if ~result then TRANS = ''
group ID GIMG
select
when type = 'Icon' then switch ID AIMG ICON name
when type = 'Picture' then switch ID AIMG PICT name TRANS
when type = 'None' then switch ID AIMG ATTRS MUIA_Frame 0
otherwise nop
end
endgroup
popasl ID S7 CONTENT name
end
when comm = 'IMAGE' then do
select
when type = 'Icon' then do
check ID C1 ATTRS Disabled TRUE
end
when type = 'Picture' then do
check ID C1 ATTRS Disabled FALSE
end
when type = 'None' then do
check ID C1 ATTRS Disabled TRUE
end
otherwise nop
end
popasl ID S7 CONTENT ''
end
when comm = 'ISET' then do
cycle ID R1
gspec = result
poplist ID S7
sname = result
sval = name
if gspec = 6 then do
name = ''
call open('images','build:images.lst','R')
do while ~eof('images')
line = readln('images')
if line = '' then leave
parse var line vname '=' value .
if sname = '' then do
if value = sval then do
sname = vname
poplist ID S7 CONTENT sname
leave
end
end
else do
if index(vname,sname) > 0 then do
sval = value
leave
end
end
end
call close('images')
end
else poplist ID S7 CONTENT sval
group ID GIMG
image ID AIMG SPEC '"'gspec':'sval'"' ATTRS Image_FontMatch TRUE MUIA_Frame 0
endgroup
end
when comm = 'CLASS' then do
check ID C1
if result then dirlist ID D1 PATH '"SYS:Classes/Gadgets"'
else dirlist ID D1 PATH '"MUI:Libs/MUI"'
string ID S6 CONTENT ''
end
when comm = 'CSET' then do
string ID S6 CONTENT substr(name,lastpos('/',name)+1)
end
otherwise nop
end
exit